package com.ibeeking.found.content.service.common.constants.enums;

/**
 * @Author ibeeking
 * @Date: 2021-01-05 19:15
 * @Description: 组合券包类型枚举值
 */
public enum BroadcastLuckTypeEnum {
    LUCKY_TYPE_LIKE(1, "点赞抽奖"),
    LUCKY_TYPE_DISCUSS(2, "评论抽奖"),
    LUCKY_TYPE_GROUP(3, "组队抽奖"),
    ;

    private Integer value;
    private String name;

    BroadcastLuckTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static BroadcastLuckTypeEnum getEnum(Integer value) {
        for (BroadcastLuckTypeEnum enumObj : values()) {
            if (enumObj.getValue().equals(value)) {
                return enumObj;
            }
        }
        return null;
    }
    public static String getNameByValue(Integer value) {
        for (BroadcastLuckTypeEnum enumObj : values()) {
            if (enumObj.getValue().equals(value)) {
                return enumObj.getName();
            }
        }
        return null;
    }
}
